package com.singleton.lazy;

/**
 * 饿汉式 - 同步代码块  - 不可用， 因为连线程安全都保证不了
 *
 */
public class Singleton_05 {
}

class Single05{

    private Single05(){}

    private static Single05 single05 ;

    public static Single05 getInstance(){
        if (single05 == null){
            synchronized (Single05.class){
                single05 = new Single05();
            }
        }
        return single05;
    }
}
